import 'package:flutterproject/generated/json/base/json_convert_content.dart';
import 'package:flutterproject/page/mine/children/assets/data/assets_detail_bean.dart';

AssetsDetailBean $AssetsDetailBeanFromJson(Map<String, dynamic> json) {
	final AssetsDetailBean assetsDetailBean = AssetsDetailBean();
	final int? amount = jsonConvert.convert<int>(json['amount']);
	if (amount != null) {
		assetsDetailBean.amount = amount;
	}
	final double? balance = jsonConvert.convert<double>(json['balance']);
	if (balance != null) {
		assetsDetailBean.balance = balance;
	}
	final String? enableRecharge = jsonConvert.convert<String>(json['enableRecharge']);
	if (enableRecharge != null) {
		assetsDetailBean.enableRecharge = enableRecharge;
	}
	final String? enableSwap = jsonConvert.convert<String>(json['enableSwap']);
	if (enableSwap != null) {
		assetsDetailBean.enableSwap = enableSwap;
	}
	final String? enableTransfer = jsonConvert.convert<String>(json['enableTransfer']);
	if (enableTransfer != null) {
		assetsDetailBean.enableTransfer = enableTransfer;
	}
	final String? enableWithdraw = jsonConvert.convert<String>(json['enableWithdraw']);
	if (enableWithdraw != null) {
		assetsDetailBean.enableWithdraw = enableWithdraw;
	}
	final double? frozen = jsonConvert.convert<double>(json['frozen']);
	if (frozen != null) {
		assetsDetailBean.frozen = frozen;
	}
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		assetsDetailBean.id = id;
	}
	final List<AssetsDetailList>? list = jsonConvert.convertListNotNull<AssetsDetailList>(json['list']);
	if (list != null) {
		assetsDetailBean.list = list;
	}
	final int? price = jsonConvert.convert<int>(json['price']);
	if (price != null) {
		assetsDetailBean.price = price;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		assetsDetailBean.title = title;
	}
	final int? type = jsonConvert.convert<int>(json['type']);
	if (type != null) {
		assetsDetailBean.type = type;
	}
	final bool? transferLimit = jsonConvert.convert<bool>(json['transferLimit']);
	if (transferLimit != null) {
		assetsDetailBean.transferLimit = transferLimit;
	}
	return assetsDetailBean;
}

Map<String, dynamic> $AssetsDetailBeanToJson(AssetsDetailBean entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['amount'] = entity.amount;
	data['balance'] = entity.balance;
	data['enableRecharge'] = entity.enableRecharge;
	data['enableSwap'] = entity.enableSwap;
	data['enableTransfer'] = entity.enableTransfer;
	data['enableWithdraw'] = entity.enableWithdraw;
	data['frozen'] = entity.frozen;
	data['id'] = entity.id;
	data['list'] =  entity.list?.map((v) => v.toJson()).toList();
	data['price'] = entity.price;
	data['title'] = entity.title;
	data['type'] = entity.type;
	data['transferLimit'] = entity.transferLimit;
	return data;
}

AssetsDetailList $AssetsDetailListFromJson(Map<String, dynamic> json) {
	final AssetsDetailList assetsDetailList = AssetsDetailList();
	final int? createTime = jsonConvert.convert<int>(json['createTime']);
	if (createTime != null) {
		assetsDetailList.createTime = createTime;
	}
	final double? opAfter = jsonConvert.convert<double>(json['opAfter']);
	if (opAfter != null) {
		assetsDetailList.opAfter = opAfter;
	}
	final String? opRemark = jsonConvert.convert<String>(json['opRemark']);
	if (opRemark != null) {
		assetsDetailList.opRemark = opRemark;
	}
	final int? opType = jsonConvert.convert<int>(json['opType']);
	if (opType != null) {
		assetsDetailList.opType = opType;
	}
	final double? opValue = jsonConvert.convert<double>(json['opValue']);
	if (opValue != null) {
		assetsDetailList.opValue = opValue;
	}
	return assetsDetailList;
}

Map<String, dynamic> $AssetsDetailListToJson(AssetsDetailList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['createTime'] = entity.createTime;
	data['opAfter'] = entity.opAfter;
	data['opRemark'] = entity.opRemark;
	data['opType'] = entity.opType;
	data['opValue'] = entity.opValue;
	return data;
}